$color-primary: #20a0ff;
$color-title: #495060;

.wrapper {
    &-body {
        font-size: 14px;
        background-color: #eee;
        color: $color-title;
    }
    &-header {
        height:80px;
        line-height: 80px;
        margin-bottom: 30px;
        background-color: $color-primary;
        box-shadow: 0 2px 1px rgba(0,0,0,.15);
    }
    &-nav {
        a {
            float: left;
            padding:0 20px;
            color: #fff;
            &:hover {
                position: relative;
                &:after {
                    content: "";
                    position: absolute;
                    left:0; bottom:0;
                    width:100%;
                    height: 4px;
                    background-color: lighten(#20a0ff, 20%);
                }
            }
        }
        i {
            vertical-align: -1px;
            margin-right: 3px;
        }
    }
    &-container {
        width:90%;
        margin-left: auto;
        margin-right: auto;
        background-color: #fff;
        border-radius: 10px;
        border:1px solid lighten(#ccc, 8%);
        box-shadow:0 1px 2px 0 rgba(0,0,0,.05);
    }
    &-footer {
        padding:50px ;
        margin-top: 30px;
        background-color: #324057;
        color: #fff;
    }
    &-menu, &-content {
        position: relative;
        padding-top: 30px;
        padding-bottom: 30px;
        &:after {
            content:"";
            position: absolute;
            top:0; bottom:0;
            width: 1px; height: 100%;
            background-color: #ccc;
        }
    }
    &-menu {
        $indent: 30px;
        &,a {
            color: #666;
        }
        dt {
            margin-bottom: 10px;
            font-size: 16px;
            color: #333;
            text-indent: $indent;
        }
        dd {
            line-height: 50px;
            color: darken(#ccc,20%);
            text-indent: $indent + $indent / 2;
            a {
                display: block;
                text-indent: $indent + $indent / 2 + 10px;
                &:hover {
                    background-color: lighten(#ccc, 15%);
                }
            }
            &.on {
                position: relative;
                z-index: 2;
                border-right:2px solid $color-primary;
                a {
                    color: $color-primary;
                }
            }
        }
        &:after {
            right:0;
        }
    }
    &-content {
        padding-left: 25px;
        padding-right: 25px;
        &:after {
            left: -1px;
        }
    }
    &-article {
        h1,h2,h3,h4,h5,h6 {
            line-height: 1.5;
            margin:12px 0;
        }
        h1 {
            font-size: 24px;
            &:first-child {
                margin-top: -12px;
            }
        }
        h2 {
            font-size: 18px;
        }
        p {
            margin: 10px 0;
        }
        .anchor {
            overflow: hidden;
            &:hover {
                a {
                    opacity: 1;
                }
            }
            h2, a {
                float: left;
            }
            a {
                opacity: 0;
                position: relative;
                top: 8px;
                margin-left: 10px;
                font-size: 22px;
                transition: opacity .6s ease;
            }
        }
    }
}

.example {
    margin: 20px 0;
    border: 1px solid #eee;
    border-radius: 5px;
    transition: all .6s;
    &:hover {
        box-shadow: 0 3px 6px 0 rgba(darken($color-primary, 50%), .2);
    }
    &-case,
    &-code {
        padding: 15px;
        &-more {
            position: relative;
            height: 34px;
            line-height: 34px;
            border-top: 1px solid #eee;
            text-align: center;
            color: #ccc;
            cursor: pointer;
            transition: background .4s;
            &:hover {
                background-color: lighten(#eee, 5%);
                color: $color-primary;
            }
            i,span {
                position: absolute;
                left :50%;
                transition: all .4s linear;
                transform: translateX(0);
            }
            i {
                top:50%;
                font-size: 16px;
                margin:-8px 0 0 -8px;
            }
            span {
                opacity: 0;
                margin-left: 15px;
            }
        }
    }
    &.hover &-code-more {
        i,span {
            transform: translateX(-30px);
        }
        span {
            opacity: 1;
        }
    }
    &-code {
        display: none;
    }
    &-desc {
        padding: 10px 15px;
    }
}

a:hover {
    text-decoration: none;
}

.demo-layout {
    background-color: #99a9bf;
    color: #fff;
    &,
    &-light,
    &-dark {
        padding: 10px 0;
        margin: 10px 0;
        text-align: center;
        border-radius:5px;
    }
    &-light {
        background-color: #e5e9f2;
    }
    &-dark {
        background-color: #d3dce6;
    }
}

/* 代码块 */
pre code {
    padding:0 !important;
    border-radius: 5px;
    font-size: 14px;
}